#!/usr/bin/perl

require "./mailadmin-lib.pl";
my ($k, $i, @vols, $baktime, $strline, @line);

&header($text{'display_title'}, "", undef, 0, 1);

print "<form name=qdform action=maildir_set.cgi method=post>\n";
print "<p><center><b>$text{'disp_uconf_bak'}</b></center>";
print "<div style='valign:top;width:100%;height:280;overflow:auto'>";
print "<table width=100% class=mode1 border=0 celladding=0 cellspacing=0>\n";
print "<tr class=title1><td><b>$text{'th_dname'}</b></td><td><b>$text{'th_uname'}</b></td> ", 
    "<td><b>$text{'th_mquota'}</b></td><td><b>$text{'th_clrpasswd'}</b></td></tr>\n";

open (USERBAK, $config{'vpopmail_bak'});

$strline = <USERBAK>;
$i = 0;
my $cls;
while ($strline)
{
    chomp($strline);

    @line = split (":", $strline);
    if ($i % 2) {$cls = 'class=mode2'} else {$cls = 'class=mode1'};
    printf "<tr $cls><td>$line[1]</td><td>$line[0]</td><td>%.2f&nbsp;MB</td><td>$line[3]</td></tr>\n", $line[2]/1048756;

    $i++;
    $strline = <USERBAK>;
}

close (USERBAK);
print "</table>\n";
print "</div>";

print "</form>\n";

&footer("maildir_edit.cgi", $text{"maildir_title"});
